package com.twu.biblioteca;

public class book {
           private String bookName;
           private int bookID;
           private String authorName;
           private int quantity;
            private String category;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        book book = (book) o;

        if (!getBookName().equals(book.getBookName())|| getBookID() != book.getBookID()) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return getBookName().hashCode();
    }

    public book(String name,int id,String auth,int quantity,String category)
           {

               this.setBookName(name);
               this.setBookID(id);
               this.setAuthorName(auth);

               this.setQuantity(quantity);
               this.setCategory(category);
           }


    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public int getBookID() {
        return bookID;
    }

    public void setBookID(int bookID) {
        this.bookID = bookID;
    }

    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }
}
